import { Flex } from "antd-mobile";
import React from "react";

import styles from './index.module.css'

import PropTypes from 'prop-types'

export default function FilterFooter({ok, cancel, onCancel, onSave}) {
  return (
    <Flex align={'center'} className={styles.filterFooter}>
      <Flex.Item className={styles.cancel} onClick={() => {onCancel()}}>{cancel}</Flex.Item>
      <Flex.Item className={styles.ok} onClick={() => {onSave()}}>{ok}</Flex.Item>
    </Flex>
  )
}

FilterFooter.propTypes = {
  ok: PropTypes.string.isRequired,
  cancel: PropTypes.string.isRequired,
  onCancel: PropTypes.func.isRequired,
  onOk: PropTypes.func.isRequired,
}